﻿@using KPIS.GERP.Models
@model KPIS.GERP.Models.ICM.OfficeSuppliesLot
@{
    ViewBag.Title = "ระบบควบคุมและจำหน่ายพัสดุ";
    ViewBag.Descr = "ทะเบียนควบคุมพัสดุ-วัสดุ";

    if (Model != null)
    {
        ViewBag.OfficeSuppliesLotId = Model.OfficeSuppliesLotId;
    }
}

@using (Html.BeginForm("UploadPictureOfficeSuppliesLot", "ParcelControlAssetList", new { OfficeSuppliesLotId = Model.OfficeSuppliesLotId }, FormMethod.Post, new { enctype = "multipart/form-data", @class = "form-horizontal" }))
{
    @Html.AntiForgeryToken()

    <div class="block-button-menu-above">
        @Html.ActionLink("กลับไปหน้าแสดงข้อมูล", "IndexOfficeSuppliesLot", new { OfficeSuppliesLotId = Model.OfficeSuppliesLotId }
                        , new { @class = "btn btn-gray button-standard-width btn-small", role = "button" })
        @Html.ButtonSubmit()
        @Html.ActionLink("ยกเลิก", "IndexOfficeSuppliesLot", new { OfficeSuppliesLotId = Model.OfficeSuppliesLotId }
                        , new { @class = "btn btn-danger button-standard-width btn-small", role = "button" })
    </div>
    @Html.ValidationSummary()
    @Html.Partial("_EditorOfficeSuppliesLotDetails")
}

@section scripts
{
    <script>
        $("form").submit(function (e) {
            e.preventDefault();
            var currentForm = this;
            bootbox.confirm('บันทึกข้อมูลใช่หรือไม่',function (result) {
                if (result) {
                    currentForm.submit();
                }
            });
        });
    </script>
}
